import axios from '@/utils/request'
import type {attrListmodul,attrInfomodul,attrlistdatamodul} from './model/Attr'

enum Api {
    // 请求列表数据
    getattrListapi='/admin/product/attrInfoList',
    //  删除属性
    delattrListdata = '/admin/product/deleteAttr',
    //增加或者修改属性
    postattrListdata = '/admin/product/saveAttrInfo'

}
// 请求列表数据
export const reqgetattrListdata = ({category1Id,category2Id,category3Id}:attrListmodul) => axios.get<any,attrlistdatamodul>(`${Api.getattrListapi}/${category1Id}/${category2Id}/${category3Id}`)

// 删除属性
export const reqgetdelattrListdata = (attrId:number) => axios.delete(`${Api.delattrListdata}/${attrId}`)

// 增加或者修改属性
export const reqgetpostattrListdata = (data:attrInfomodul)=> axios.post(Api.postattrListdata,data)



